package co.edu.javeriana.aes.patrones.monopolio.gameroom;

import java.io.Serializable;
import java.util.ArrayList;

/**
 *
 * @author gersua
 */
public class GameRoom implements Serializable {

    private String name;
    private Rules rules;
    private ArrayList<PlayerDTO> playerDTOs = new ArrayList<PlayerDTO>();

    public Rules getRules() {
        return rules;
    }

    public void setRules(Rules rules) {
        this.rules = rules;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public ArrayList<PlayerDTO> getPlayerDTOs() {
        return playerDTOs;
    }

    public void setPlayerDTOs(ArrayList<PlayerDTO> playerDTOs) {
        this.playerDTOs = playerDTOs;
    }

    public boolean isPlayerInRoom(PlayerDTO playerDTO) {
        return playerDTOs.contains(playerDTO);
    }

    @Override
    public String toString() {
        return "GameRoom{" + "name=" + name + ", players=" + playerDTOs + ", rules=" + rules + '}';
    }
}
